package com.shangxian.giveithome.mapper;


import com.shangxian.giveithome.entity.Asylum;
import com.shangxian.giveithome.entity.AsylumCreate;
import com.shangxian.giveithome.entity.AsylumScreen;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface AsylumMapper {

    /**
     * 根据id查看收容详情
     *
     * @param id
     * @return
     */
    Asylum queryByAsylumDetails(Long id);

    /**
     * 根据ids 查询收容列表
     *
     * @param asylumScreen
     * @return
     */
    List<Asylum> queryAsylumMeId(@Param("asylumScreen") AsylumScreen asylumScreen);


    /**
     * 创建收容记录
     *
     * @param asylumCreate
     * @param id
     */
    void save(@Param("asylumCreate") AsylumCreate asylumCreate, @Param("id") Long id);

    /**
     * 查看收容是否存在
     *
     * @param id
     * @return
     */
    Integer queryExistence(Long id);


    void update(AsylumCreate asylumCreate);

    Asylum queryExistences(Long id);

    void delete(Long id);

    Asylum queryByAsylumStatus(Long id);

    void updateAsylumStatus(@Param("id") Long id, @Param("status") Long status);
}
